#define  _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<assert.h>
#include<string.h>
char* my_strncpy(char* dest,const char* str, size_t num)
{
	int sz = strlen(str);
	assert(dest && str);
	char* st = dest;
	int n = num;
	for (int i = 1;i <= n;i++)
	{
		if (i > sz)
		{
			*dest = '\0';
			dest++;
			continue;
		}
		*dest = *str;
		dest++;
		str++;
	}
	return st;
}
int main()
{
	char arr1[20] = "xxxxxxxxxx";
	char arr2[] = "abc";
	int num = 0;
	scanf("%d", &num);
	my_strncpy(arr1, arr2,num);
	printf("%s\n", arr1);
	return 0;
}